Skip to content

[6.x] Fix onUnmounted warning in toggleArchitecturalBackground - #15791

Merged
duncanmcclean merged 1 commit into
statamic:6.xfrom
ionutrusenL:fix-architectural-background-unmounted
Nov 5, 2026
Merged

duncanmcclean merged 1 commit into
statamic:6.xfrom
ionutrusenL:fix-architectural-background-unmounted

Conversation

@ionutrusenL

Copy link
Copy Markdown
Contributor

toggleArchitecturalBackground calls onUnmounted on every invocation. When it is called outside setup(), for example from the navigation treeLoaded/treeChanged callbacks or the unmounted hook, Vue warns: "onUnmounted is called when there is no active component instance to be associated with".

This only registers the hook when there is an active component instance, so existing callers that run during setup (e.g. the passkeys page) keep their cleanup.

@duncanmcclean
duncanmcclean merged commit fb1d436 into statamic:6.x Nov 5, 2026
62 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants